home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_121_(06-1985).d64
/
checkbook ii
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
8KB
|
281 lines
1 GOTO 100
20 M=LEN(B$)
22 IFM/2<>INT(M/2)THENB$=B$+" ":M=M+1
23 FORN=1TOM/2
24 PRINTCHR$(19);LEFT$(CUR$,VT-1);
26 PRINTSPC(21-N)LEFT$(B$,N);RIGHT$(B$,N);
27 NEXTN
28 RETURN
100 MAXSIZE = 150 : REM MAX # TRANSACTIONS
110 CSCREEN = 53280 : REM SCREEN COLOR POKE LOCATION
120 CHARS$ = "[151]" : REM CHARACTER COLOR = WHITE
130 SCREEN = 1 : REM SCREEN COLOR = BLACK
140 HOME$ = "" : REM CURSOR HOME
150 CLSCREEN$ = "[147]" : REM CLEAR SCREEN
160 LOWERCASE$ = CHR$(14)
170 UPPERCASE$ = CHR$(142)
175 CR$ = CHR$(13)
180 SPACES$ = " " :REM 40 SPACES
185 FOR N=1 TO 8 : EQUAL$=EQUAL$+"==========" : NEXT N
190 POKE CSCREEN,SCREEN : POKE CSCREEN + 1,SCREEN
195 FORX=1TO25:CUR$=CUR$+CHR$(17):NEXTX
200 DIM DT$(MAXSIZE),BC$(MAXSIZE),DS$(MAXSIZE),CK$(MAXSIZE)
210 DIM CA$(MAXSIZE),DA$(MAXSIZE)
220 PRINT CLSCREEN$;LOWERCASE$ : PRINT CHARS$
230 PRINT HOME$;"";SPACES$;
240 PRINT" [146] [195]HECKBOOK [194]ALANCER [201][201][151] [146]";
250 PRINT"";SPACES$;
260 FOR I = 4 TO 23
270 PRINT " [146]";LEFT$(SPACES$,38);" [146]";
280 NEXT I
290 PRINT " [208]RESS [193]NY [203]EY [212]O [194]EGIN ";
291 VT=5:B$="[146][195]HECKBOOK [194]ALANCER [201][201] IS A ":GOSUB20
292 VT=7:B$="[146]COMPERHENSIVE,ELECTRONIC CHECKBOOK ":GOSUB20
293 VT=9:B$="[146]KEEPER THAT EVEN PRINTS OUT CHECKS. ":GOSUB20
294 VT=11:B$="[146] [206]OW YOU CAN MAINTAIN YOUR CHECK- ":GOSUB20
295 VT=13:B$="[146]BOOK LEDGER ON A COMPUTER,SAVE IT TO":GOSUB20
296 VT=15:B$="[146]DISK,CALL IT UP ANYTIME YOU WISH TO ":GOSUB20
297 VT=17:B$="[146]REVEIW OR ENTER CHECKS IN YOUR ":GOSUB20
298 VT=19:B$="[146]ACCOUNT.[198]ORMAT A SEPARATE DISK TO ":GOSUB20
299 VT=21:B$="[146]SAVE ALL YOUR CALCULATIONS ON. ":GOSUB20
300 GET A$ : IF A$="" THEN 300
400 PRINT CLSCREEN$;
410 PRINT "[208]LEASE ENTER THE CHECKS FILE NAME"
420 PRINT "[146]---------------------------------"
430 CFILE$="" : INPUT CFILE$
440 IF CFILE$ = "" OR CFILE$ = "END" THEN 9900
460 OPEN 15,8,15,"I0" : OPEN 5,8,5,CFILE$+",S,R"
480 INPUT#15,EN,EM$,ET,ES
500 IF EN < 20 THEN 700
520 PRINT : PRINT " [200]MMMM, IS THIS A NEW ONE"; : INPUT NW$
540 IF NW$ = "Y" OR NW$ = "YES" THEN 600
560 CLOSE 15 : CLOSE 5
580 GOTO 400
600 LINES = 0
620 GOTO 1000
700 PRINT : PRINT " [210]EADING THE FILE ... PLEASE WAIT"
710 LINES = 0
720 INPUT#5,QA$,QB$,QC$,QD$,QE$,QF$
740 RS = ST
760 LINES = LINES + 1
780 DT$(LINES) = QA$ : BC$(LINES) = QB$
800 DS$(LINES) = QC$ : CK$(LINES) = QD$
820 CA$(LINES) = QE$ : DA$(LINES) = QF$
860 IF RS = 0 THEN 720
880 CLOSE 5
1000 PRINT CLSCREEN$
1020 PRINT" [195]HECK [205]ANAGER [205]ENU [146]"
1040 PRINT : PRINT : PRINT TAB(8);"[151]1 = [193]DD [212]RANSACTIONS"
1060 PRINT : PRINT TAB(8);"2 = [195]HANGE [212]RANSACTIONS"
1100 PRINT : PRINT TAB(8);"3 = [208]RINT [195]HECK [210]EGISTER"
1120 PRINT : PRINT TAB(8);"4 =[156] [194]ALANCE [201]NQUIRY"
1125 PRINT : PRINT TAB(8);"5 =[151] [194]UDGET [193]NALYSIS"
1130 PRINT : PRINT TAB(8);"6 = [209]UIT"
1140 PRINT "[151] [197]NTER OPTION"; : INPUT OP
1160 IF OP = 6 THEN CLOSE 15:CLOSE 5:GOTO 9900
1180 IF OP < 1 OR OP > 5 THEN 1000
1200 ON OP GOSUB 2000,2500,3000,4300,4500
1220 GOTO 1000
2000 IF LINES + 1 > MAXSIZE THEN RETURN
2010 PRINT CLSCREEN$;"[212]RANSACTION [206]UMBER: ";LINES + 1;"[146]"
2020 PRINT "[196]ATE ........."
2030 PRINT " "
2040 PRINT "[194]UDGET [195]AT ..."
2050 PRINT " "
2060 PRINT "[196]ESCRIPTION .."
2070 PRINT " "
2080 PRINT "[195]HECK [206]O ....."
2090 PRINT " "
2100 PRINT "[195]HECK [193]MOUNT .[151]"
2110 PRINT " "
2120 PRINT "[196]EPOSIT [193]MOUNT[151][151]"
2121 PRINT"[212]O SAVE LAST FILE ENTERD,"
2122 PRINT"TYPE [197][206][196] IN DATE AREA PROMT"
2130 IF DP = 1 THEN RETURN
2180 IF LINES<>0 THEN PRINT HOME$;"? ";DT$(LINES)
2190 PRINT HOME$;""; : INPUT E$
2200 IF E$ = "" OR LEFT$(E$,3) = "END" THEN GOSUB 4000 : RETURN
2210 DT$(LINES + 1) = E$
2220 LN = 5 : CO = 15 : SZ = 3 : GOSUB 5000
2230 IF E$="[164]" THEN E$=""
2240 BC$(LINES + 1) = E$
2250 LN = 7 : SZ = 20 : GOSUB 5000
2260 IF E$="[164]" THEN E$=""
2270 DS$(LINES + 1) = E$
2280 LN = 9 : SZ = 4 : GOSUB 5000
2290 IF E$="[164]" THEN E$=""
2300 CK$(LINES + 1) = E$
2310 LN = 11 : SZ = 9 : GOSUB 5000
2320 IF E$="[164]" THEN E$=""
2330 CA$(LINES + 1) = E$
2340 LN = 13 : SZ = 9 : GOSUB 5000
2350 IF E$="[164]" THEN E$=""
2360 DA$(LINES + 1) = E$
2400 LINES = LINES + 1
2410 PRINT"[151][201]S THE ABOVE CORRECT?";
2420 GET A$ : IF A$<>"Y" AND A$<>"N" THEN 2420
2430 IF A$="N" THEN QN=LINES : EDIT = 1 : GOSUB 2540
2440 EDIT = 0 : GOTO 2000
2500 PRINT CLSCREEN$;"[212]RANSACTION [206]UMBER[151]? 0[157][157][157]"; : INPUT QN
2510 IF QN = 0 THEN GOSUB 4000 : RETURN
2520 IF QN<0 OR QN>LINES THEN 2500
2530 DP = 1 : GOSUB 2020 : DP = 0
2540 PRINT HOME$;"";
2550 PRINT "? ";DT$(QN)
2560 PRINT "? ";BC$(QN)
2570 PRINT "? ";DS$(QN)
2580 PRINT "? ";CK$(QN)
2590 PRINT "? ";CA$(QN)
2600 PRINT "? ";DA$(QN)
2610 PRINT HOME$;"";
2620 PRINT""; : INPUT DT$(QN)
2630 PRINT""; : INPUT BC$(QN)
2640 PRINT""; : INPUT DS$(QN)
2650 PRINT""; : INPUT CK$(QN)
2660 PRINT""; : INPUT CA$(QN)
2670 PRINT""; : INPUT DA$(QN)
2700 PRINT HOME$;"[201]S THE ABOVE CORRECT?";
2710 GET A$ : IF A$<>"Y" AND A$<>"N" THEN 2710
2720 IF A$="N" THEN 2540
2730 IF EDIT = 1 THEN RETURN
2740 GOTO 2500
3000 PRINT CLSCREEN$;""
3020 PRINT TAB(10);"S = DISPLAY ON SCREEN"
3030 PRINT TAB(10);"P = PRINT ON PRINTER"
3040 PRINT TAB(10);"[156]Q = QUIT, RETURN TO MENU"
3050 PRINT "";TAB(10);"[197]NTER YOUR OPTION[151]"; : INPUT SQ$
3080 IF SQ$<>"S" AND SQ$<>"P" AND SQ$<>"Q" THEN 3000
3100 IF SQ$="Q" THEN RETURN
3120 LCNT = 0 : FLAG = 1
3130 ANSWER$ = ""
3140 IF SQ$="S" THEN 3200
3160 PRINT CLSCREEN$;"[144] [208]RINT IN [208]ROGRESS[151]"
3180 OPEN4,4,7 : CMD4
3200 NBAL = 0
3210 FOR N=1 TO LINES
3220 A$=RIGHT$(" "+CA$(N),9)
3230 B$=RIGHT$(" "+DA$(N),9)
3240 IF LCNT < 5 THEN GOSUB 3500
3245 IF ANSWER$="Q" THEN RETURN
3250 NBAL = NBAL - VAL(CA$(N)) + VAL(DA$(N))
3260 GOSUB 3800
3270 IF SQ$="S" THEN GOSUB 3300
3280 IF SQ$="P" THEN GOSUB 3400
3290 NEXT N : IF SQ$="P" THEN PRINT#4," " : CLOSE 4 : RETURN
3292 PRINT "[208]RESS [210][197][212][213][210][206][151]"; : INPUT ANSWER$
3295 RETURN
3300 PRINT DT$(N);TAB(9);BC$(N);TAB(13);CK$(N);TAB(18);A$;" ";B$
3310 PRINT TAB(5);DS$(N);TAB(30);"";NB$;"[146]"
3320 LCNT = LCNT - 2
3330 RETURN
3400 C$ = LEFT$(DT$(N)+" ",10)
3410 D$ = LEFT$(BC$(N)+" ",5)
3420 E$ = LEFT$(CK$(N)+" ",6)
3430 F$ = LEFT$(DS$(N)+SPACES$,24)
3440 PRINT C$;D$;E$;F$;A$;" ";B$;" ";NB$
3460 LCNT = LCNT - 1
3470 RETURN
3500 IF SQ$="P" THEN GOTO 3600
3505 IF FLAG=1 THEN FLAG=0 : GOTO 3550
3510 PRINT HOME$;"";
3520 PRINT "[208]RESS [210][197][212][213][210][206] OR Q TO QUIT[151]";
3530 INPUT ANSWER$
3540 IF ANSWER$ = "Q" THEN RETURN
3550 PRINT CLSCREEN$;" [196]ATE [195]AT [195]K #[151] [193]MOUNT[151] [196]EPOSIT "
3560 LCNT = 24
3570 RETURN
3600 IF FLAG=1 THEN FLAG=0 : GOTO 3610
3605 PRINT CHR$(12) : REM FORM FEED
3610 PRINT TAB(26);"[195] [200][160][197] [195] [203] [210] [197] [199] [201] [211][160][212][160][197] [210][151]"
3615 PRINT " "
3620 PRINT TAB(2);"[196][193][212][197] [195][193][212] [195][203] # [196][197][211][195][210][201][208][212][201][207][206] [195][203] [193][205][207][213][206][212] [151]";
3625 PRINT " [196][197][208][207][211][201][212] [194][193][204][193][206][195][197][151]"
3630 PRINT EQUAL$
3640 PRINT " "
3650 LCNT = 55
3660 ANSWER$ = ""
3670 RETURN
3800 NB$=STR$(INT(NBAL * 100 + .005) * .01)
3810 FOR X=1 TO LEN(NB$)
3820 IF MID$(NB$,X,1)="." THEN P=X : GOTO 3850
3830 NEXT X
3840 NB$=NB$+".00" : GOTO 3860
3850 IF P=LEN(NB$)-1 THEN NB$=NB$+"0"
3860 NB$ = RIGHT$(" "+NB$,9)
3880 RETURN
4000 PRINT CLSCREEN
4020 PRINT " [211]AVING, [208]LEASE WAIT[151]"
4030 CLOSE 5 : OPEN 5,8,5,"@0:"+CFILE$+",S,W"
4040 FOR N = 1 TO LINES
4050 PRINT#5,DT$(N);CR$;BC$(N);CR$;DS$(N);CR$;CK$(N);CR$;CA$(N);CR$;DA$(N)
4060 NEXT N
4100 CLOSE 5
4120 RETURN
4300 PRINT CLSCREEN$;"[154] [195]OMPUTING ... [208]LEASE WAIT[151]"
4310 NBAL = 0
4320 FOR N = 1 TO LINES
4330 NBAL = NBAL - VAL(CA$(N)) + VAL(DA$(N))
4340 NEXT N
4350 PRINT CLSCREEN$;" [206]EW [194]ALANCE IS ...[151]";NBAL
4360 PRINT " [208]RESS [210][197][212][213][210][206] TO CONTINUE[151]"
4370 PRINT " "; : INPUTQ$
4380 RETURN
4500 PRINT CLSCREEN$;"";TAB(12);"[194]UDGET [193]NALYSIS"
4510 PRINT TAB(12);"---------------":PRINT
4520 PRINT TAB(7);"[151][197]NTER BUDGET CATEGORY";
4530 E$="END" : INPUT E$
4540 IF E$="END" THEN RETURN
4550 NBAL = 0 : ACCUM = 0
4560 PRINT "";TAB(9);"[215]ORKING, PLEASE WAIT.[151]"
4570 FOR N=1 TO LINES
4580 NBAL = NBAL + VAL(CA$(N))
4590 IF BC$(N) = E$ THEN ACCUM = ACCUM - VAL(CA$(N)) + VAL(DA$(N))
4600 NEXT N
4610 ACCUM = ABS(ACCUM)
4620 GOSUB 3800
4625 PRINT CLSCREEN$;"[194]UDGET [193]NALYSIS FOR [195]ATEGORY [151]";E$
4630 PRINT "[212]OTAL [193]LL [195]HECKS ... [151]";NB$
4640 SV = NBAL : NBAL = ACCUM : GOSUB 3800
4650 PRINT "[156][195]ATEGORY [193]MOUNT .... [151]";NB$
4660 NBAL = SV
4670 IF NBAL = 0 THEN PCT = 0 : GOTO 4700
4680 PCT = INT(ACCUM / NBAL * 100 + .5)
4700 PRINT "% OF [193]LL [195]HECKS .... [151]";PCT;"%"
4720 PRINT "[144][208]RESS [210][197][212][213][210][206][151]"; : INPUT ANSWER$
4730 GOTO 4500
5000 PRINT "";
5020 IF LN = 1 THEN 5050
5030 FOR N = 2 TO LN : PRINT ""; : NEXT N
5050 IF CO = 1 THEN 5100
5060 FOR N = 2 TO CO : PRINT ""; : NEXT N
5100 PRINT "? ";
5120 FOR N = 1 TO SZ : PRINT "[164]"; : NEXT N
5125 PRINT "";
5130 IF LN = 1 THEN 5150
5140 FOR N = 2 TO LN : PRINT ""; : NEXT N
5150 IF CO = 1 THEN 5180
5160 FOR N = 2 TO CO : PRINT ""; : NEXT N
5180 INPUT E$
5181 I = LEN(E$)
5182 FOR N = I TO 2 STEP -1
5183 IF MID$(E$,N,1) <> "[164]" THEN N = 0 : GOTO 5185
5184 E$ = LEFT$(E$,N-1)
5185 NEXT N
5190 PRINT "";
5200 IF LN = 1 THEN 5220
5210 FOR N = 2 TO LN : PRINT ""; : NEXT N
5220 IF CO = 1 THEN 5250
5230 FOR N = 2 TO CO : PRINT ""; : NEXT N
5250 PRINT "";
5260 PRINT LEFT$(SPACE$,SZ);
5270 PRINT"";
5280 IF LN = 1 THEN 5300
5290 FOR N = 2 TO LN : PRINT ""; : NEXT N
5300 IF CO = 1 THEN 5330
5310 FOR N = 2 TO CO : PRINT ""; : NEXT N
5330 PRINT "";E$
5350 RETURN
9900 PRINT CLSCREEN$;UPPERCASE$
9920 GOTO9940
9940 POKE53280,0:POKE53281,0:PRINTCHR$(147)